home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
FM Towns: Software Contest 3
/
FM Towns Software Contest 3.iso
/
exp
/
video_t
/
no1
/
c_sorse
/
eup2.c
< prev
next >
Wrap
Text File
|
1994-01-07
|
3KB
|
124 lines
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <winb.h>
#include <te.h>
#include <fntb.h>
#include <gui.h>
int Dialog_eup = -1 ;
int Message_eup = -1 ;
int _001Message_eupd = -1 ;
int _002Message_eup = -1 ;
int DButton_eup = -1 ;
int _001DButton_eup = -1 ;
int Message_eupon = -1 ;
int _001Message_eupoff = -1 ;
int TIcon_eup[4] = -1 ;
int _003Message_eup = -1 ;
int _004Message_eup = -1 ;
int _005Message_eup = -1 ;
int _006Message_eup = -1 ;
extern int backid ;
extern int Dia_edit ;
extern int Dialog_menu ;
extern int Text ;
int radioeup = 0;
/* initDataEUP:DButton_00a3:MJ_DBUTTONL40の呼び出し関数 */
int eup_on(kobj, messId, argc, pev, trigger)
int kobj ;
int messId ;
int argc ;
EVENT *pev ;
int trigger ;
{
int i;
char comnd[200]="/EUP ";
for (i = 0 ; i < 4 ; i++)
{
if (TIcon_eup[i] == radioeup) break ;
}
if(i>=4) return NOERR ;
switch(i)
{
case 0: strcat(comnd,"GO"); break;
case 1: strcat(comnd,"STOP"); break;
case 2: strcat(comnd,"PAUSE"); break;
case 3: strcat(comnd,"REPLAY"); break;
default: break;
}
MMI_SendMessage(Text,MM_SETTEXT,3,comnd,200,TRUE) ;
MMI_SendMessage(Text,MM_SETTEXT,3,"\n",5,TRUE) ;
MMI_SendMessage(Text, MM_ERASE, 0) ;
MMI_SendMessage(Text, MM_WAKE, 0) ;
MMI_SendMessage(Text, MM_SHOW, 0) ;
MMI_SendMessage(Dialog_eup,MM_ERASE,0) ;
MMI_SendMessage(Dialog_eup,MM_DETACH,0) ;
/* メニューを選択可とします。 */
MTL_resetAtrObj(Dialog_menu, ~MS_DSPONLYL40) ;
MTL_resetAtrObj(Dia_edit, ~MS_DSPONLYL40) ;
MTL_resetAtrObj(backid, ~MS_DSPONLYL40) ;
return NOERR ;
}
/* initDataEUP:_001DButton_00a3:MJ_DBUTTONL40の呼び出し関数 */
int eup_off(kobj, messId, argc, pev, trigger)
int kobj ;
int messId ;
int argc ;
EVENT *pev ;
int trigger ;
{
MMI_SendMessage(Dialog_eup,MM_ERASE,0) ;
MMI_SendMessage(Dialog_eup,MM_DETACH,0) ;
/* メニューを選択可とします。 */
MTL_resetAtrObj(Dialog_menu, ~MS_DSPONLYL40) ;
MTL_resetAtrObj(Dia_edit, ~MS_DSPONLYL40) ;
MTL_resetAtrObj(backid, ~MS_DSPONLYL40) ;
return NOERR ;
}
int radioeup = 0 ;
/* initDataEUP:TIcon_eup[0]:MJ_TICONL40の呼び出し関数 */
/* initDataEUP:TIcon_eup[1]:MJ_TICONL40の呼び出し関数 */
/* initDataEUP:TIcon_eup[2]:MJ_TICONL40の呼び出し関数 */
/* initDataEUP:TIcon_eup[3]:MJ_TICONL40の呼び出し関数 */
int eup_func(kobj, messId, argc, pev, trigger)
int kobj ;
int messId ;
int argc ;
EVENT *pev ;
int trigger ;
{
/* 現在選択状態にあるボタンを非選択状態にし、選択可にします */
MTL_resetFlagObj(radioeup,~(MS_UNSELECT | MS_TOGGLE)) ;
MMI_SendMessage(radioeup, MM_SHOW, 0) ;
/* 画面選択フラグを更新します */
radioeup = kobj ;
/* 呼び出し元トグルボタンを選択状態にし、選択不可にします */
MTL_setFlagObj(kobj, MS_UNSELECT | MS_TOGGLE) ;
MMI_SendMessage(kobj, MM_SHOW, 0) ;
return NOERR ;
}
int l_eup()
{
/* 背景を選択不可とします。*/
MTL_setAtrObj(backid, MS_DSPONLYL40) ;
MTL_setAtrObj(Dialog_menu, MS_DSPONLYL40) ;
MTL_setAtrObj(Dia_edit, MS_DSPONLYL40) ;
MMI_SendMessage(Dialog_eup,MM_ATTACH,1,MMI_GetBaseObj()) ;
MMI_SendMessage(Dialog_eup, MM_SHOW, 0) ;
return NOERR ;
}